package com.yantong.mapper;

import com.yantong.pojo.UsableTeamMiddle;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UsableTeamMiddleMapper {
	/**
	 * delete by primary key
	 *
	 * @param id primaryKey
	 * @return deleteCount
	 */
	int deleteByPrimaryKey(Long id);

	/**
	 * insert record to table
	 *
	 * @param record the record
	 * @return insert count
	 */
	int insert(UsableTeamMiddle record);

	/**
	 * insert record to table selective
	 *
	 * @param record the record
	 * @return insert count
	 */
	int insertSelective(UsableTeamMiddle record);

	/**
	 * select by primary key
	 *
	 * @param id primary key
	 * @return object by primary key
	 */
	UsableTeamMiddle selectByPrimaryKey(Long id);

	/**
	 * update record selective
	 *
	 * @param record the updated record
	 * @return update count
	 */
	int updateByPrimaryKeySelective(UsableTeamMiddle record);

	/**
	 * update record
	 *
	 * @param record the updated record
	 * @return update count
	 */
	int updateByPrimaryKey(UsableTeamMiddle record);

	int insertList(@Param("list") List<UsableTeamMiddle> list);

	List<UsableTeamMiddle> selectByOrderId(@Param("orderId") Long orderId);

	UsableTeamMiddle selectByOrderIdAndTicketId(@Param("orderId") Long orderId, @Param("ticketId") Long ticketId);
}